package items.containers;

import items.Item;
import items.ItemType;
import items.SlotType;

import java.util.ArrayList;
import java.util.List;

public class Corpse implements Container{
    private static Item me;
    private boolean openBool = true;
    private List<Item> contents = new ArrayList<Item>();

    public static synchronized Item getInstance() {
        if (me == null) {
            me = new KitchenFridge();
        }
        return me;
    }

    @Override
    public boolean isOpen() {
        return openBool;
    }

    @Override
    public void openContainer() {
    }

    @Override
    public void closeContainer() {
    }

    @Override
    public List<Item> getContents() {
        return contents;
    }

    @Override
    public String showContents() {
        StringBuilder buf = new StringBuilder();
        for (Item item : getContents()) {
            buf.append("\n");
            buf.append(item.getTitle());
        }
        return buf.toString();
    }

    @Override
    public String getTitle() {
        return "Your Corpse";
    }

    @Override
    public String getDescription() {
        return "This is your dead body.";
    }

    @Override
    public String getShortName() {
        return "Corpse";
    }

    @Override
    public ItemType getItemType() {
        return ItemType.CONTAINER;
    }

    @Override
    public SlotType getSlotType() {
        return null;
    }

    @Override
    public String getDisplayName() {
        return getTitle();
    }

    @Override
    public int getAwesomenessModifier() {
        return 0;
    }

    @Override
    public int getHaxxorsModifier() {
        return 0;
    }

    @Override
    public int getMasteryModifier() {
        return 0;
    }

    @Override
    public int getConfuciusModifier() {
        return 0;
    }
}